import request from '@/utils/request'
import type { PostLoginPayload, ResApi, LoginRes } from './user'

export const loginApi = (data: PostLoginPayload) => {
  return request<ResApi<LoginRes>>({
    method: 'post',
    url: '/user/login',
    data,
  })
}
